When executing business logic in a computerized environment with respect to graphed data, i.e., hierarchical serial numbers, a large number of repeated queries may be needed to answer queries regarding the state and organization of such data. Depending upon the nature of the query and the state of the data, di□erent optimization strategies may apply to the order of the query.
In order to optimize such queries, data from prior queries may be reused to avoid extraneous processing and lookups. It will be appreciated that lookups are most e□cient when batched in groups as large as possible. The present disclosure provides an optimal methodology and computer program product for optimizing such lookups.